"""
简化版数据模式模块
"""

# 只导入核心的AI算法相关模块，避免复杂的依赖
try:
    from .ai_algorithm import (
        BehaviorType, AlertLevel, DetectionStatus, BoundingBox, DetectionResult, 
        TrackingResult, BehaviorAnalysisResult, DetectionRequest, DetectionResponse,
        BatchDetectionRequest, BatchDetectionResponse, AIModelConfig, AlertRule,
        AlertEvent, ModelPerformanceMetrics
    )
    # 为了兼容性，创建一些别名
    AIAlgorithmType = BehaviorType  # 临时兼容
    DetectionObject = DetectionResult
    AIAnalysisRequest = DetectionRequest
    AIAnalysisResult = DetectionResponse
    
except ImportError as e:
    print(f"Warning: Failed to import ai_algorithm: {e}")
    # 提供默认值
    BehaviorType = None
    AlertLevel = None
    DetectionStatus = None
    BoundingBox = None
    DetectionResult = None

try:
    from .person_detection import (
        PersonBoundingBox, PersonInfo, PersonDetectionResult, DensityAnalysisResult,
        CrowdAlert, DetectionConfig, DensityConfig, DetectionTask, ModelInfo,
        PerformanceMetrics, HeatmapData, EvacuationRoute
    )
except ImportError as e:
    print(f"Warning: Failed to import person_detection: {e}")

try:
    from .ai_result import (
        AIResultType, AIResultBase, AIResultCreate, AIResultUpdate, AIResultResponse,
        AIResultListResponse, AIResultFilters, RealTimeAIResult, AIResultStatistics,
        BatchAIResultCreate
    )
except ImportError as e:
    print(f"Warning: Failed to import ai_result: {e}")

__all__ = [
    # AI Algorithm schemas (from original ai_algorithm.py)
    "BehaviorType", "AlertLevel", "DetectionStatus", "BoundingBox", "DetectionResult",
    "TrackingResult", "BehaviorAnalysisResult", "DetectionRequest", "DetectionResponse",
    "BatchDetectionRequest", "BatchDetectionResponse", "AIModelConfig", "AlertRule",
    "AlertEvent", "ModelPerformanceMetrics",
    
    # Compatibility aliases
    "AIAlgorithmType", "DetectionObject", "AIAnalysisRequest", "AIAnalysisResult",
    
    # AI Result schemas
    "AIResultType", "AIResultBase", "AIResultCreate", "AIResultUpdate", "AIResultResponse",
    "AIResultListResponse", "AIResultFilters", "RealTimeAIResult", "AIResultStatistics",
    "BatchAIResultCreate",
    
    # Person Detection schemas
    "PersonBoundingBox", "PersonInfo", "PersonDetectionResult", "DensityAnalysisResult",
    "CrowdAlert", "DetectionConfig", "DensityConfig", "DetectionTask", "ModelInfo",
    "PerformanceMetrics", "HeatmapData", "EvacuationRoute"
]